#ifndef _INTERF_ACCOUNT_H_
#define _INTERF_ACCOUNT_H_

struct IUser
	: public IBase
{
	static IUserPtr New(
		const UINT64& uid
		, const UINT64& number
		, const e::String& pwd
		);

	virtual UINT64 getUID() const = 0;
	virtual UINT64 getNumber() const = 0;
	virtual e::String getPassword() const = 0;
	virtual bool isOnline() const = 0;
	virtual e::net::Address getAddr() const = 0;
	virtual void refresh_addr(const e::net::Address& addr) = 0;

	virtual void refresh() = 0;
};

struct IUserCache
	: public IBase
{
	static IUserCachePtr New();

	virtual void active(const IUserPtr& pUser) = 0;
	virtual IUserPtr get(const UINT64& number, bool create = false) = 0;
};

#endif